-
Notifications
You must be signed in to change notification settings - Fork 27.4k
test($sanitize): skip clobber test on Edge #16388
Conversation
test/ngSanitize/sanitizeSpec.js
Outdated
$sanitize('<form><input name="parentNode" /></form>'); | ||
}).toThrowMinErr('$sanitize', 'elclob'); | ||
if (!/Edge\/16/.test(window.navigator.userAgent)) { | ||
// Skip test on Edge 16 due to browser bug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps include this link here: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15263856/#pagenotfound
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem is that the issue is private, so it goes to 404. Maybe we should create an issue in our repo with a short description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just occurred to me that on Edge, when this fails to fail, the return value from $sanitize
appears to be something like the console object.
Am I right?
How about we change the code so that if the result that will be returned from $sanitize
is not a string then we throw the elclob
error?
That way we don’t need to change our tests and we are covered from returning something dodgy in Edge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parentNode
is buggy in Edge as well but if our tests pass then I guess we may leave it as it is. LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but the config.browserNoActivityTimeout
change should perhaps land in a separate commit.
93794b6
to
918032e
Compare
In some circumstances, Edge 16 will not throw on clobbered elements, because the nextSibling property is null. The exact cause is currently unknown.
6d04246
to
bd47ba1
Compare
Also reduce karma log level on Travis to INFO. Before, the log level was DEBUG, but it seems that prior to karma 2.0.0, the debug messages were not outoput on Karma, so this simply restores the status quo (and prevents cluttering the log).
59ead5f
to
32db186
Compare
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change?
Please check if the PR fulfills these requirements
Other information: